package learn.advance.integer1;

import org.omg.PortableInterceptor.INACTIVE;

import java.util.ArrayList;

class Demo1Integer{
    public static void Test(){
        Integer in1=new Integer(1);
        System.out.println(in1);

        Integer in2=new Integer("2");
        System.out.println(in2);

        Integer in3= Integer.valueOf(1);

        Integer in4=Integer.valueOf("1");

        System.out.println(in4);

        int i=in1.intValue();
        System.out.println(i);
    }
}


class Demo2Integer{
    public static void Test(){
        Integer in=1;
        in=in+2;

        ArrayList<Integer> list=new ArrayList<>();
        list.add(1);
        int a=list.get(0);
    }
}


class Demo3Integer{
    public static void Test(){
        int i1=100;
        String s1=i1+"";
        System.out.println(s1+200);

        System.out.println("================");
        String s2=Integer.toString(100);
        System.out.println(s2+200);

        int i=Integer.parseInt(s1);
        System.out.println(i-10);
        System.out.println("================");
    }
}






public class TestInteger {
    public static void main(String[] args) {
        //Demo1Integer.Test();
        Demo3Integer.Test();
    }
}
